package com.yf.construction.storage.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yf.construction.storage.dto.ConstructionStorageDTO;
import com.yf.construction.storage.entity.ConstructionStorage;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface StorageConvert {

    StorageConvert INSTANCE = Mappers.getMapper(StorageConvert.class);

    ConstructionStorageDTO entityToDto(ConstructionStorage entity);

    ConstructionStorage dtoToEntity(ConstructionStorageDTO reqDTO);

    List<ConstructionStorageDTO> listEntityDto(List<ConstructionStorage> list);

    Page<ConstructionStorageDTO> pageEntityDto(Page<ConstructionStorage> page);
}
